import request from '@/utils/request'

export function quartzTable(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_ADMIN_API}/api/system/job/table`,
    method: 'post',
    data: query
  })
}

export function quartzLoad(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_ADMIN_API}/api/system/job/load`,
    method: 'get',
    params: query
  })
}

export function quartzRun(id) {
  return request({
    url: `${process.env.VUE_APP_MODULE_ADMIN_API}/api/system/job/run/${id}`,
    method: 'post'
  })
}

export function quartzChangeStatus(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_ADMIN_API}/api/system/job/changeStatus`,
    method: 'post',
    data: query
  })
}

export function quartzSave(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_ADMIN_API}/api/system/job/save`,
    method: 'post',
    data: query
  })
}

export function quartzDelete(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_ADMIN_API}/api/system/job/delete`,
    method: 'post',
    data: query
  })
}
